package org.chen.enums;

import lombok.Getter;

/**
 * @Author: 陈亮
 * @Date: 2019/3/24 18:12
 */
@Getter
public enum ApiResultEnum {

    UNKNOWN_ERROR(-1, "未知错误"),
    SUCCESS(200, "成功"),
    USER_NOT_EXIST(1, "用户不存在"),
    USER_IS_EXISTS(2, "用户已存在"),
    ACCOUNT_OR_PASSWORD_ERROR(3,"账号或密码错误"),
    DATA_IS_NULL(3, "数据为空"),
    BAD_REQUEST(400, "参数解析失败"),
    METHOD_NOT_ALLOWED(405, "不支持当前请求方法"),
    UNAUTHO_ERROR(900, "权限异常"),
    NO_ACCESS_PERMISSION(901, "无访问权限"),
    SYSTEM_ERR(1000, "系统异常");

    private Integer code;
    private String msg;

    ApiResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
